package homework.day01;

public class Test1 {
    public static void main(String[] args) {
        String fileName1 = "logo.jpg";
        String fileName2 = "jquery.1.1.js";

        String ext = getExtByName(fileName1);
        System.out.println(ext);
        ext = getExtByName(fileName2);
        System.out.println(ext);

    }

    private static String getExtByName(String name) {
        int index = name.lastIndexOf(".")+1;
        return name.substring(index);
    }
}
